Skip to content

Cache the flutter-sdk for testing#4703

Merged
CoderDake merged 55 commits intoflutter:masterfrom
CoderDake:flutter-cache
Nov 11, 2022
Merged

Cache the flutter-sdk for testing#4703
CoderDake merged 55 commits intoflutter:masterfrom
CoderDake:flutter-cache

Conversation

@CoderDake
Copy link
Copy Markdown
Contributor

@CoderDake CoderDake commented Nov 4, 2022

This PR updates our build.yml workflow so that each of the jobs cache the flutter-sdk and the flutter build artifacts.

For example this is the macos job before the cache is populated
https://github.com/flutter/devtools/actions/runs/3411571892/jobs/5675938782

This is the macos job after the cache is populated
https://github.com/flutter/devtools/actions/runs/3411987066/jobs/5676899259

Details about the cache loading step can be seen in the "Cache Generated Files" step
Screen Shot 2022-11-07 at 2 05 48 PM

on the actions page, our caches can be seen:
Screen Shot 2022-11-07 at 1 58 00 PM

@CoderDake CoderDake changed the title try some caching Cache the flutter-sdk and flutter artifacts Nov 7, 2022
@CoderDake CoderDake marked this pull request as ready for review November 7, 2022 19:06
@CoderDake CoderDake requested a review from a team as a code owner November 7, 2022 19:06
@CoderDake CoderDake requested review from kenzieschmoll and removed request for a team November 7, 2022 19:06
Comment thread tool/bots.sh Outdated
@CoderDake
Copy link
Copy Markdown
Contributor Author

Talked with Kenzie about this and we are going to try to tighten up the cache usage even more here.
the plan will be to add a build step beforemain test_ddc and test_dart2js so they can all benefit from flutter already being built for them.
That way we don't need to do the same work 3 times.

@CoderDake CoderDake changed the title Cache the flutter-sdk and flutter artifacts Cache the flutter-sdk for testing Nov 10, 2022
Comment thread .github/workflows/build.yaml
Comment thread .github/workflows/build.yaml Outdated
cd flutter-sdk
git checkout $LATEST_FLUTTER_CANDIDATE
env:
LATEST_FLUTTER_CANDIDATE: ${{ steps.flutter-candidate.outputs.FLUTTER_CANDIDATE }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see ${{ steps.flutter-candidate.outputs.FLUTTER_CANDIDATE }} being used a few times, are we duplicating this, or in other words can it be put in a local var?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately I don't think there is a way to make this less verbose.

Comment thread tool/latest_flutter_candidate.sh
@CoderDake CoderDake merged commit d845394 into flutter:master Nov 11, 2022
@CoderDake CoderDake deleted the flutter-cache branch November 11, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants